import 'dart:ui';

import 'package:flutter/material.dart';

import 'flow_item_widget.dart';

class ImageFilterWidget extends StatefulWidget {
  final double flag;
  ImageFilterWidget(this.flag);

  @override
  _ImageFilterWidgetState createState() => _ImageFilterWidgetState();
}

class _ImageFilterWidgetState extends State<ImageFilterWidget> {
  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Positioned.fill(child: FlowItemWidget()),
        Positioned.fill(
          child: ClipRRect(
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(30),
              bottomLeft: Radius.circular(30),
              topRight: Radius.circular(4),
              bottomRight: Radius.circular(4),
            ),
            child: BackdropFilter(
              filter: ImageFilter.blur(sigmaX: 0.5, sigmaY: 0.5),
              child: Container(color: Colors.grey.withOpacity(widget.flag)),
            ),
          ),
        )
      ],
    );
  }
}
